







Algorithms..::FirstConsecutiveEqual<(Of <T>)> Method (IList<(Of <T>)>, Int32, IEqualityComparer<(Of <T>)>) |
See Also |
![]() ![]() |
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Finds the first occurence of count consecutive equal items in the
list. A passed IEqualityComparer is used to determine equality.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static int FirstConsecutiveEqual<T>( IList<T> list, int count, IEqualityComparer<T> equalityComparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function FirstConsecutiveEqual(Of T) ( _ list As IList(Of T), _ count As Integer, _ equalityComparer As IEqualityComparer(Of T) _ ) As Integer |
Visual C++ |
---|
public: generic<typename T> static int FirstConsecutiveEqual ( IList<T>^ list, int count, IEqualityComparer<T>^ equalityComparer ) |
Parameters
- list
- IList<(Of <T>)>
The list to examine.
- count
- Int32
The number of consecutive equal items to look for. The count must be at least 1.
- equalityComparer
- IEqualityComparer<(Of <T>)>
The IEqualityComparer<T> used to compare items for equality. Only the Equals method will be called.
Return Value
The index of the first item in the first run of count consecutive equal items, or -1 if no such run exists.
Type Parameters
- T
See Also
Algorithms Class
Wintellect.PowerCollections Namespace